import fetch from './request.js'

const api = {}

// 注册获取验证码
// 参数 地址 实体 请求方式   true 'application/x-www-form-urlencoded' : 'application/json',  是否隐藏加载框
//type, hideLoading

/* -------------------------------------  用户信息  -------------------------------------- */
//登录
api.login = params => fetch.request("/api/userInfo/login", params, "POST", true, false)
//获取用户信息
api.getUserInfo = params => fetch.request("/api/userInfo/getUserInfo", params, "POST", true, false)
//首页表格数据
api.indexData = params => fetch.request("/api/skirt/getMonthAccomplishNum", params, "POST", false, false)
//订单页顶部按钮
api.orderData = params => fetch.request("/api/skirt/getGroupUserDuration", params, "POST", true, false)
//订单页表格
api.orderTableData = params => fetch.request("/api/skirt/getSkirtOrderPrecessList", params, "POST", true, false)
//开包
api.unpack = params => fetch.request("/api/skirt/unpack", params, "POST", true, false)
//生产完成
api.accomplish = params => fetch.request("/api/skirt/accomplish", params, "POST", true, false)
//详情接口
api.detail = params => fetch.request("/api/skirt/getSkirtOrderStockList", params, "POST", true, false)

//我的工资
api.myPrice = params => fetch.request("/api/skirt/getSkirtRecordDetail", params, "POST", true, false)
//工资汇总
api.countPrice = params => fetch.request("/api/skirt/getUserSalarySkirtDetail", params, "POST", true, false)

//取消中
api.canceling = params => fetch.request("/api/skirt/canceling", params, "POST", true, false)

//统计
api.statisticsScanNum = params => fetch.request("/api/skirt/statisticsScanNum", params, "POST", true, false)


//虚拟订单
api.getUnrealOrderList = params => fetch.request("/api/unrealOrder/getUnrealOrderList", params, "POST", true, false)
//修改
api.updateUnrealOrderStatus = params => fetch.request("/api/unrealOrder/updateUnrealOrderStatus", params, "POST", true, false)


///api/skirt/getFinePrecessList
api.getFinePrecessList = params => fetch.request("/api/skirt/getFinePrecessByHFiveList", params, "POST", true, false)
//生产完成
api.accomplishFine = params => fetch.request("/api/skirt/accomplishFine", params, "POST", true, false)

api.getReleaseFinePrecess = params => fetch.request("/api/skirt/getReleaseFinePrecess", params, "POST", true, false)


api.deleteUnrealOrder = params => fetch.request("/api/unrealOrder/deleteUnrealOrder", params, "POST", true, false)


// //短信登录
// api.codeLogin = params => fetch.request("/api/codeLogin", params, "POST", false, true)

// //绑定手机号
// api.bindAccount = params => fetch.request("/api/bindAccount", params, "POST", false, true)

// //获取用户信息
// api.getUserInfo = params => fetch.request("/api/info", params, "POST", true, false)

// //编辑用户信息
// api.editUserInfo = params => fetch.request("/api/editInfo", params, "POST", false, true)

// //注册
// api.register = params => fetch.request("/api/register", params, "POST", false, true)

// //忘记密码
// api.forgetPwd = params => fetch.request("/api/forgetPwd", params, "POST", false, true)

// //注销账号
// api.cancellationAccount = params => fetch.request("/api/cancellation", params, "POST", true, true)

// //退出登录
// api.logout = params => fetch.request("/api/logout", params, "POST", true, true)

// //获取微信openId
// api.getWeixinOpenId = params => fetch.request("/api/getOpenid", params, "POST", false, true)

// //根据用户id获取用户信息
// api.getUserInfoById = params => fetch.request("/api/infoByOther", params, "POST", false, false)

// //获取版本信息（是否强制更新，version版本号，下载地址）
// api.getNewsVersion = params => fetch.request("/api/appVersion/isUpgrade", params, "POST", false, false)

// //身份切换
// api.switchRoleBySelf  = params => fetch.request("/api/customer/switchRole", params, "POST", false,  true)

// //发送短信验证码
// api.sendMsg  = params => fetch.request("/api/message/send/msg", params, "POST", false,  true)

// //发送图形验证码
// api.sendCaptcha = params => fetch.request("/api/captcha/captcha", params, "POST", false,  true)

// //忘记支付密码
// api.forgetPayPwd = params => fetch.request("/api/forgetPayPwd", params, "POST", false, true)

// //校验支付密码
// api.checkPayPwd = params => fetch.request("/api/checkPayPwd", params, "POST", false, true)

// //修改支付密码
// api.editPayPwd = params => fetch.request("/api/editPayPwd", params, "POST", false, true)

// //修改登录密码
// api.editLoginPwd = params => fetch.request("/api/editPwd", params, "POST", false, true)



export default api